<?
class photoModel extends iMVC_Model{

   public $_table='photo'; 
   public $_pk='photo_id';
   public $a=1;


   public function findByUser(userModel $user){
   
   
        $reader=$this->db->getDbReader();
        $sql="select * from $this->_table where user_id=$user->user_id";
        $res=$reader->readByQuery($sql);
   
        if($res!=null){

            return $res;
        }
        else{
            return false; 
        
        }

   
   }   
 public function findByInfo(infoModel $info){
   
   
        $reader=$this->db->getDbReader();
        $sql="select * from $this->_table where info_id=$info->info_id";
        $res=$reader->readByQuery($sql);
   
        if($res!=null){

            return $res;
        }
        else{
            return false; 
        
        }
   } 

  
}


// vim600:ts=4 st=4 foldmethod=marker foldmarker=<<<,>>>
// vim600:syn=php commentstring=//%s
